/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hyperbeam.Estructuras;


/**
 *
 * @author Programmer
 */
public class Punto3D {
    final double invalid = -1000000;
    double X;
    double Y;
    double Z;
    double W;

    public double getX() {
        return X;
    }

    public double getY() {
        return Y;
    }

    public double getZ() {
        return Z;
    }

    public double getW() {
        return W;
    }

    public void setX(double X) {
        this.X = X;
    }

    public void setY(double Y) {
        this.Y = Y;
    }

    public void setZ(double Z) {
        this.Z = Z;
    }

    public void setXYZ(double X, double Y, double Z){
        this.X = X;
        this.Y = Y;
        this.Z = Z;
    }

    public void setInvalido(){
        this.X = invalid;
        this.Y = invalid;
        this.Z = invalid;
    }
    
    public boolean esValido(){
        return (this.X !=  invalid);
    }



    public void setW(double W) {
        this.W = W;
    }

    public Punto3D(double X, double Y, double Z) {
        this.X = X;
        this.Y = Y;
        this.Z = Z;
        this.W = 1;
    }
    
    public Punto3D(){
        this.W = 1;
    }

}
